package com.yao.club.entity.dto;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.Instant;

@Getter
@Setter
@Entity
@Table(name = "sys_coupon")
public class SysCoupon {
    @Id
    @Column(name = "coupon_id", nullable = false, length = 50)
    private String couponId;

    @Column(name = "coupon_code", nullable = false, length = 50)
    private String couponCode;

    @Column(name = "coupon_name", nullable = false, length = 200)
    private String couponName;

    @Column(name = "coupon_type", nullable = false, length = 50)
    private String couponType;

    @Column(name = "coupon_type_desc", length = 200)
    private String couponTypeDesc;

    @Column(name = "coupon_amount", precision = 10, scale = 2)
    private BigDecimal couponAmount;

    @Column(name = "discount_rate", precision = 5, scale = 2)
    private BigDecimal discountRate;

    @Column(name = "amount", precision = 10, scale = 2)
    private BigDecimal amount;

    @Column(name = "overdue_start_time", nullable = false)
    private Instant overdueStartTime;

    @Column(name = "overdue_end_time", nullable = false)
    private Instant overdueEndTime;

    @Lob
    @Column(name = "remark")
    private String remark;

    @Column(name = "scene", length = 100)
    private String scene;

    @Column(name = "status", nullable = false, length = 50)
    private String status;

    @Column(name = "status_desc", length = 200)
    private String statusDesc;

    @Column(name = "create_time")
    private Instant createTime;

    @Column(name = "update_time")
    private Instant updateTime;

}